home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 24 / Amiga Format AFCD24 (Feb 1998, Issue 108).iso / -seriously_amiga- / shareware / programming / other / kaliosisquantrum / morb / iconify.s < prev    next >
Text File  |  1998-01-12  |  2KB  |  82 lines

  1. *
  2. * CdBSian Obviously Universal & Interactive Nonsense (COUIN)
  3. * (Absurdité CdBSienne Manifestement Universelle et Interactive)
  4. * ©1997-1998, CdBS Software (MORB)
  5. * Iconification routine
  6. * $Id: Iconify.s 0.1 1997/09/11 21:41:35 MORB Exp MORB $
  7. *
  8.  
  9. _Iconify:
  10.      movem.l   d0-7/a0-6,-(a7)
  11.      bsr       _SwitchToSystem
  12.      move.l    (AbsExecBase).w,a6
  13.      move.l    _SStack,d0
  14.      CALL      UserState
  15.      move.l    Gfx_Base,a6
  16.      move.l    Int_Base,a1
  17.      lea       ib_ViewLord(a1),a1
  18.      CALL      LoadView
  19.      CALL      DisownBlitter
  20.      move.l    Int_Base,a6
  21.      CALL      RemakeDisplay
  22.  
  23.      CALL      OpenWorkBench
  24.      tst.l     d0
  25.      beq.s     .OuinSnif
  26.      move.l    d0,a0
  27.      moveq     #0,d0
  28.      move.b    sc_BarHeight(a0),d0
  29.      addq.l    #1,d0
  30.  
  31.      sub.l     a0,a0
  32.      pea       TAG_DONE
  33.      move.l    d0,-(a7)
  34.      pea       WA_Top
  35.      move.l    d0,-(a7)
  36.      pea       WA_Height
  37.      pea       128.w
  38.      pea       WA_Width
  39.      pea       WinTitle
  40.      pea       WA_Title
  41.      pea       TRUE
  42.      pea       WA_CloseGadget
  43.      pea       TRUE
  44.      pea       WA_DepthGadget
  45.      pea       TRUE
  46.      pea       WA_DragBar
  47.      pea       TRUE
  48.      pea       WA_RMBTrap
  49.      pea       IDCMP_CLOSEWINDOW
  50.      pea       WA_IDCMP
  51.      move.l    a7,a1
  52.      CALL      OpenWindowTagList
  53.      lea       19*4(a7),a7
  54.      move.l    d0,d7
  55.      beq.s     .OuinSnif
  56.      move.l    d0,a0
  57.  
  58.      move.l    (AbsExecBase).w,a6
  59.      move.l    wd_UserPort(a0),a0
  60.      CALL      WaitPort
  61.  
  62.      move.l    Int_Base,a6
  63.      move.l    d7,a0
  64.      CALL      CloseWindow
  65.  
  66.  
  67. .OuinSnif:
  68.      move.l    Gfx_Base,a6
  69.      CALL      OwnBlitter
  70.      sub.l     a1,a1
  71.      CALL      LoadView
  72.      move.l    (AbsExecBase).w,a6
  73.      CALL      SuperState
  74.      move.l    d0,_SStack
  75.      bsr       _SwitchToCOUIN
  76.      movem.l   (a7)+,d0-7/a0-6
  77.      rts
  78.  
  79. WinTitle:
  80.      dc.b      "COUIN",0
  81.      even
  82.